<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<html>
    <head>

        <title>Maak een keuze uit de Enqu&ecirc;tes</title>
    </head>
    <body>
        <jsp:include page="include/header.jsp"/>
        <h1>Enqu&ecirc;te Systeem</h1>
        <form action="gebruikersvoorkeur" method="POST">
            <input type="hidden" value="${sessionScope.userId}" name="id">
            <input type="submit" value="Selecteer Enquetes" >
        </form>
            ${verwijdergelukt}
            ${verwijdermislukt}
        <table border="1">
            <tr>
                <th>enqu&ecirc;tes</th>
                <th>Aantal compleet ingevulde Enquetes</th>
            </tr>
            <c:forEach items="${result}" var="row" >
                <tr>
                    <td>${row['titel']}</td>
                    <td>${row['voltooid']}</td>
                    <td>  <form action="start_enquete" method="POST">
                            <input type="hidden" value="${row['rowid']}" name="id" />
                            <input type="submit" value="Bekijk enquete" />
                        </form></td>
                    <td>  <form action="verwijderenquete" method="POST">
                            <input type="hidden" value="${row['voltooid']}" name="voltooid">
                            <input type="hidden" value="${row['rowid']}" name="id" />
                            <input type="submit" value="Verwijder Enquete" />
                        </form></td>

                </tr>
            </c:forEach>
        </table>
    <td>
    </body>
</html>